MySqlBlob Constructor(Byte[])
Initializes a new instance of the
MySqlBlob class, setting the
Value property to the provided array of bytes.
In the following example a byte array is initialized and passed as parameter to
MySqlBlob constructor. Afterwards the data is read from the instance of
MySqlBlob.
public void ConstructMyBlob()
{
byte[] myByteArray = {1,2,3,4,5,6,7,8,9,10};
MySqlBlob myBlob = new MySqlBlob(myByteArray);
myBlob.Seek(0,SeekOrigin.Begin);
for (int i = 0; i<10;i++)
{
Console.WriteLine(myBlob.ReadByte());
}
}
Public Sub ConstructMyBlob()
Dim myByteArray() As Byte = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
Dim myBlob As MySqlBlob = New MySqlBlob(myByteArray)
myBlob.Seek(0, SeekOrigin.Begin)
Dim i As Integer
For i = 0 To 9
Console.WriteLine(myBlob.ReadByte())
Next i
End Sub